home *** CD-ROM | disk | FTP | other *** search
- ' File: kyle.vbs
- ' Description: Sample of using TEConnection object
- ' from visual basic
- ' Created: February 7, 2001
- '
- ' Copyright (c) 2000 GlobalSCAPE, Inc.
- ' The copyright to the computer program(s) herein
- ' is the property of GlobalSCAPE, Inc.
- ' The program(s) may be used and/or copied only with
- ' the written permission of GlobalSCAPE, Inc.
- ' or in accordance with the terms and conditions
- ' stipulated in the agreement/contract under which
- ' the program(s) have been supplied.
- '
-
- 'Variable declaration
- Dim Kyle
-
- 'Create TEConnection object
- Set Kyle = CreateObject("CuteFTPPro.TEConnection")
-
- 'Create standard Shell object
- Set Shell = CreateObject("WScript.Shell")
-
- Kyle.Protocol = "FTP"
- Kyle.Host = "Kyle.globalscape.com"
- Kyle.Login = "anonymous"
- Kyle.UseProxy = "BOTH"
- Kyle.RemoteFolder = "/Pub"
-
- 'Get name of desctop folder
- strDesktop = Shell.SpecialFolders("Desktop")
- Kyle.Localfolder = strDesktop
-
- 'Display message box
- nUserChoise = MsgBox ("Script is going to download latest version of CuteZip onto your desktop", 1)
-
- 'Quit if user clicked "Cancel"
- If nUserChoise = 2 Then
- Quit(1)
- End If
-
- If (Not Kyle.RemoteExists("cutezip")) Then
- MsgBox "Remote folder does not exist"
- Quit(1)
- End If
-
- If(Not Kyle.RemoteExists("cutezip/cutezip.exe")) Then
- MsgBox "Remote file does not exist"
- Quit(1)
- End If
-
- 'Initiate download
- Kyle.Download "cutezip/cutezip.exe", strDesktop+"\cutezip.exe"
-
-
-
-
-
-
-